import request from '@/utils/request'

export function getcategory(data) {
  return request({
    url: '/category/get_all_category',
    method: 'get',
    params: data
  })
}
// 新增分类
export function addCategory(data) {
  return request({
    url: '/category/add_category',
    method: 'post',
    data
  })
}
// 获取所有分类的位置
export function all_adress(data){
  return request({
    url: '/category/all_adress',
    method: 'get',
    params:data
  })
}
// 编辑分类
export function editcategory(data){
  return request({
    url: '/category/edit_category',
    method: 'post',
    data
  })
}
// 删除分类
export function delete_category(data){
  return request({
    url: '/category/delete_category',
    method: 'post',
    data
  })
}